/*----------------------------------------\ | Check to see if an input argument is numeric or character; | |-------------------------------------------| |--------------------------------------------------------------------| |---------------------------| | Argument: | | name: the input argument; | |-----------------------------| |--------------------------------------------------------------------| |---------------------------------------| | Example: %chk_type(name); | | %chk_type(var23); | | %chk_type(23var); | | %chk_type(5.6); | | %chk_type(1); | | %chk_type(1.0); | | %chk_type(-.25); | | Usage: %chk_type(name); | \----------------------------------------*/ %macro chk_type(name); /*--------------------------------------------\ | Copy Right: Duo Zhou; | | Created: 8-30-2002 7:11pm; | \--------------------------------------------*/ %if (%scan(&name,1,%quote(-1234567890))=. or %scan(&name,1,-1234567890) = ) and (%quote(&name) ne) %then %do; 1 %end; %else %do; 2 %end; %mend;